package com.java.thread;

/**
 * @author
 * @date 2018/9/13 11:54
 */
public class Print implements Runnable {

    private int value;
    private int num;

    public Print(int value, int num) {
        this.value = value;
        this.num = num;
    }

    @Override
    public void run() {
        try {
            for (int i = 0; i < num; i++) {
                System.out.print(value);
                Thread.sleep(10);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
